<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>teaBoard <%
    if(@board)
%>
:: <%= @board.title %>
<%
    end
%></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%= stylesheet_link_tag 'common' %>
<% #= stylesheet_link_tag 'board' %>
<%= javascript_include_tag :defaults %>
<%
    if(@board)
%>
<link rel="alternate" type="application/rss+xml" title="<%= @board.title %>" href="<%= url_for :controller => 'board_posts', :action => 'feed' , :board_name => @board.board_name %>" />
<%
    end
%>
<script type="text/javascript">

function display_content_box(_this,loc)
{
    if(loc == 'over')
    {
       _this.style.border = "5px solid #7870AB";

    }
    else
    {
       _this.style.border = "5px solid #ffffff";
    }
}

</script>
</head>
<body>
<div id="container">
    <div id="header" class="content-box" onMouseOver="javascript:display_content_box(this,'over');" onMouseOut="javascript:display_content_box(this,'out');">
        <h1>
            TeaBoard
            <%
                if(@board)
            %>
            :: <%= @board.title %>
            &nbsp; <%= link_to (
                        image_tag('/images/feed.png'),
                        {
                        :controller => 'board_posts', 
                        :action =>'feed',
                        :board_name => @board.board_name
                        }) %>
            <%
                end
            %>
        </h1>
        <div class="sidemenu">
        <%
            if(!session[:user_id]) 
        %>
            <%= link_to 'login' , :controller=>'auth' , :action=>'login' %>
            <%= link_to 'add user', :controller=>'users',:action=>'new' %>
        <%
            else
        %>
            <%= link_to session[:user_name] , :controller=>'users', :action=> 'show' , :id => session[:user_id] %> 
            <%= link_to 'logout', :controller=>'auth', :action=>'logout' %>
            <%= link_to 'board list', :controller=>'boards', :action=>'list' %>
            <%= link_to 'user_list', :controller=>'users', :action=>'list' %>
        <%
            end
        %>
        </div>
    </div>
    <div id="content">
        <%
            if(flash[:notice])
        %>
        <p style="padding-bottom:10px;color: green"><%= flash[:notice] %></p>
        <%
            end
        %>
        <!-- S:content -->
        <%= @content_for_layout %>
        <!-- E:content -->
    </div>
    <div id="footer">
    </div>
</div>
</body>
</html>
